@extends('admin.author.layout.layout')
@section('content')

<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                书籍添加列表
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6 col-lg-offset-3">
                    @if (count($errors) > 0)
                        <div class="alert alert-danger">
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                    @if(session('success'))
                        <div class="alert alert-success">
                            {{session('success')}}
                        </div>
                    @endif
                    @if(session('error'))
                        <div class="alert alert-danger">
                            {{session('error')}}
                        </div>
                    @endif
                        <form role="form" method="post" action="{{url('admin/books/insert')}}" enctype="multipart/form-data">
                            <div class="form-group">
                                <label>书籍名称</label>
                                <input class="form-control" name="b_name" maxlength="14">
                            </div>
                            <div class="form-group">
                                <label>书籍简介</label>
                                <textarea class="form-control" rows="3" name="b_desc" maxlength="80"></textarea>
                            </div>
                            <div class="form-group">
                                <label>书籍封面</label>
                                <input type="file" name="pic">
                            </div>
                           
                            
                            <div class="form-group">
                                <label>所属分类</label>
                                <select class="form-control" name="type">
                                    <option value="0">玄幻</option>
                                    <option value="1">武侠</option>
                                    <option value="2">科幻</option>
                                    <option value="3">言情</option>
                                    <option value="4">穿越</option>
                                    <option value="5">修真</option>
                                    <option value="6">历史</option>
                                    <option value="7">恐怖</option>
                                    <option value="8">悬疑</option>
                                    <option value="9">其他</option>   
                                </select>
                            </div>
							<div class="form-group">
	                            <label>是否免费</label>
	                            <label class="radio-inline">
	                                <input type="radio" name="isfree" id="optionsRadiosInline1" value="0" checked="">免费
	                            </label>
	                            <label class="radio-inline">
	                                <input type="radio" name="isfree" id="optionsRadiosInline2" value="1">收费
	                            </label>
	              
	                        </div>

							<div class="form-group">
	                            <label>是否完结</label>
	                            <label class="radio-inline">
	                                <input type="radio" name="isend" id="optionsRadiosInline1" value="0" checked="">完结
	                            </label>
	                            <label class="radio-inline">
	                                <input type="radio" name="isend" id="optionsRadiosInline2" value="1">连载
	                            </label>
	              
	                        </div>

                            {{csrf_field()}}

                            <button type="submit" class="btn btn-primary btn-lg btn-block">添加书籍</button>
             
                        </form>
                    </div>
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>

@endsection